\(\int \csc ^4(a+b x) \sec ^2(a+b x) \, dx\) [167]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 37 \[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=-\frac {2 \cot (a+b x)}{b}-\frac {\cot ^3(a+b x)}{3 b}+\frac {\tan (a+b x)}{b} \]

[Out]

-2*cot(b*x+a)/b-1/3*cot(b*x+a)^3/b+tan(b*x+a)/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2700, 276} \[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=\frac {\tan (a+b x)}{b}-\frac {\cot ^3(a+b x)}{3 b}-\frac {2 \cot (a+b x)}{b} \]

[In]

Int[Csc[a + b*x]^4*Sec[a + b*x]^2,x]

[Out]

(-2*Cot[a + b*x])/b - Cot[a + b*x]^3/(3*b) + Tan[a + b*x]/b

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^4} \, dx,x,\tan (a+b x)\right )}{b} \\ & = \frac {\text {Subst}\left (\int \left (1+\frac {1}{x^4}+\frac {2}{x^2}\right ) \, dx,x,\tan (a+b x)\right )}{b} \\ & = -\frac {2 \cot (a+b x)}{b}-\frac {\cot ^3(a+b x)}{3 b}+\frac {\tan (a+b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.22 \[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=-\frac {5 \cot (a+b x)}{3 b}-\frac {\cot (a+b x) \csc ^2(a+b x)}{3 b}+\frac {\tan (a+b x)}{b} \]

[In]

Integrate[Csc[a + b*x]^4*Sec[a + b*x]^2,x]

[Out]

(-5*Cot[a + b*x])/(3*b) - (Cot[a + b*x]*Csc[a + b*x]^2)/(3*b) + Tan[a + b*x]/b

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.14 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.24

method result size
risch \(\frac {16 i \left (2 \,{\mathrm e}^{2 i \left (b x +a \right )}-1\right )}{3 b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{3} \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}\) \(46\)
derivativedivides \(\frac {-\frac {1}{3 \cos \left (b x +a \right ) \sin \left (b x +a \right )^{3}}+\frac {4}{3 \sin \left (b x +a \right ) \cos \left (b x +a \right )}-\frac {8 \cot \left (b x +a \right )}{3}}{b}\) \(50\)
default \(\frac {-\frac {1}{3 \cos \left (b x +a \right ) \sin \left (b x +a \right )^{3}}+\frac {4}{3 \sin \left (b x +a \right ) \cos \left (b x +a \right )}-\frac {8 \cot \left (b x +a \right )}{3}}{b}\) \(50\)
parallelrisch \(\frac {\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )+20 \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\cot ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )-90 \tan \left (\frac {b x}{2}+\frac {a}{2}\right )+20 \cot \left (\frac {b x}{2}+\frac {a}{2}\right )}{24 b \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )-24 b}\) \(80\)
norman \(\frac {\frac {1}{24 b}+\frac {5 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{6 b}-\frac {15 \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b}+\frac {5 \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{6 b}+\frac {\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )}{24 b}}{\left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{3}}\) \(98\)

[In]

int(sec(b*x+a)^2/sin(b*x+a)^4,x,method=_RETURNVERBOSE)

[Out]

16/3*I*(2*exp(2*I*(b*x+a))-1)/b/(exp(2*I*(b*x+a))-1)^3/(exp(2*I*(b*x+a))+1)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.46 \[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=-\frac {8 \, \cos \left (b x + a\right )^{4} - 12 \, \cos \left (b x + a\right )^{2} + 3}{3 \, {\left (b \cos \left (b x + a\right )^{3} - b \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )} \]

[In]

integrate(sec(b*x+a)^2/sin(b*x+a)^4,x, algorithm="fricas")

[Out]

-1/3*(8*cos(b*x + a)^4 - 12*cos(b*x + a)^2 + 3)/((b*cos(b*x + a)^3 - b*cos(b*x + a))*sin(b*x + a))

Sympy [F]

\[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=\int \frac {\sec ^{2}{\left (a + b x \right )}}{\sin ^{4}{\left (a + b x \right )}}\, dx \]

[In]

integrate(sec(b*x+a)**2/sin(b*x+a)**4,x)

[Out]

Integral(sec(a + b*x)**2/sin(a + b*x)**4, x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.95 \[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=-\frac {\frac {6 \, \tan \left (b x + a\right )^{2} + 1}{\tan \left (b x + a\right )^{3}} - 3 \, \tan \left (b x + a\right )}{3 \, b} \]

[In]

integrate(sec(b*x+a)^2/sin(b*x+a)^4,x, algorithm="maxima")

[Out]

-1/3*((6*tan(b*x + a)^2 + 1)/tan(b*x + a)^3 - 3*tan(b*x + a))/b

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.95 \[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=-\frac {\frac {6 \, \tan \left (b x + a\right )^{2} + 1}{\tan \left (b x + a\right )^{3}} - 3 \, \tan \left (b x + a\right )}{3 \, b} \]

[In]

integrate(sec(b*x+a)^2/sin(b*x+a)^4,x, algorithm="giac")

[Out]

-1/3*((6*tan(b*x + a)^2 + 1)/tan(b*x + a)^3 - 3*tan(b*x + a))/b

Mupad [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.97 \[ \int \csc ^4(a+b x) \sec ^2(a+b x) \, dx=\frac {\mathrm {tan}\left (a+b\,x\right )}{b}-\frac {2\,{\mathrm {tan}\left (a+b\,x\right )}^2+\frac {1}{3}}{b\,{\mathrm {tan}\left (a+b\,x\right )}^3} \]

[In]

int(1/(cos(a + b*x)^2*sin(a + b*x)^4),x)

[Out]

tan(a + b*x)/b - (2*tan(a + b*x)^2 + 1/3)/(b*tan(a + b*x)^3)